<html>
<head>
<style type='text/css'>
body {
   background-color: white;
   margin: 1em 2em 1em 2em;
   font-family: Sans-Serif;
   color: #002;
   line-height: 140%;
   font-size: 12px;
}

h1 {
    font-size: 140%;
}

h2 {
    font-size: 130%;
}

h3 {
    font-size: 120%;
}

h4 {
    font-size: 100%;
    font-style: normal;
    font-weight: bold;
}

h5 {
    font-size: 100%;
    font-style: italic;
    font-weight: normal;
}

pre {
   background-color: #eee;
   padding: 0.5em 0.5em 0.5em 2em;
}

@media print {
   pre {word-wrap:break-word; width:100%;}
} 

ul li,
ol li {
   padding-left: 0.3em;
   /*text-indent: -2em;*/
   margin-bottom: 0.5em;
}

em {
   font-style: normal;
   font-weight: bold;
   text-decoration: underline;
   color: #c40;
}

code {
   font-family: Monospace;
   font-size: 100%;
   color: #c40;
}

a, a * {
   text-decoration: underline;
   color: #14a0d1;
   /* border: 0.5px solid #aaa;
   white-space: nowrap;
   padding-right: 0.1em;
   padding-left: 0.1em;
   padding-bottom: -5px; */
}

a code {
   color: #14a0d1;
}

img {
   position: relative;
   bottom: -4px;
}

div.headline {
   font-weight: bold;
   font-size: 110%;
}

div.copyright {
   margin-top: 1em;
   border-top: 1px solid black;
   padding-top: 0.5em;
}

div.iris_headline {
   border-bottom: 1px solid black;
   padding-bottom: 0.3em;
}

.LaTeX {
   font-family: Monospace;
   font-size: 100%;
   border: 1px solid #060;
   color: #060;
}

code.LaTeX {
   background-color: white;
   padding: 0.5em 0.5em 0.5em 2em;
}
</style>
</head>

<body>
<div class="iris_headline">IRIS Toolbox Reference Manual</div>




<h2 id="tseries/arma">arma</h2>
<div class="headline">Apply ARMA model to input series</div>

<h4 id="syntax">Syntax</h4>
<pre><code>Y = arma(X,E,Ar,Ma,Range)</code></pre>
<h4 id="input-arguments">Input arguments</h4>
<ul>
<li><p><code>X</code> [ tseries ] - Input time series from which initial condition will be constructed.</p></li>
<li><p><code>E</code> [ tseries ] - Input time series with innovations; <code>NaN</code> values in <code>E</code> on <code>Range</code> will be replaced with <code>0</code>.</p></li>
<li><p><code>Ar</code> [ numeric | empty ] - Row vector of AR polynominal coefficients; if empty, <code>Ar = 1</code>; see Description.</p></li>
<li><p><code>Ma</code> [ numeric | empty ] - Row vector of MA polynominal coefficients; if empty, <code>Ma = 1</code>; see Description.</p></li>
<li><p><code>Range</code> [ numeric | char ] - Range on which the output series observations will be constructed.</p></li>
</ul>
<h4 id="output-arguments">Output arguments</h4>
<ul>
<li><code>X</code> [ tseries ] - Output time series constructed by running an ARMA model on the input series <code>X</code> and <code>E</code>; the output time series also includes p initial conditions where p is the order of the AR polynomial.</li>
</ul>
<h4 id="options">Options</h4>
<h4 id="description">Description</h4>
<p>The output series is constructed as follows:</p>
<p><span class="LaTeX">$$ A(L) X_t = M(L) E_t $$</span></p>
<p>where <span class="LaTeX">$A(L) = A_0 + A_1 L + \cdots$</span> and <span class="LaTeX">$M(L)=M_0 + M_1 L + \cdots$</span> are polynomials in lag operator <span class="LaTeX">$L$</span> defined by the vectors <code>Ar</code> and <code>Ma</code>. In other words,</p>
<p><span class="LaTeX">$$ X_t = \frac{1}{A_1} \left( -A_2 X_{t-1} - A_3 X_{t-2} - \cdots
           + M_0 E_t + M_1 E_{t-1} + \cdots \right) . $$</span></p>
<p>Note that the coefficient <span class="LaTeX">$A_0$</span> is <code>Ar(1)</code>, <span class="LaTeX">$A_1$</span> is <code>Ar(2)</code>, and so on.</p>
<h4 id="example">Example</h4>
<p>Construct an AR(1) process with autoregression coefficient 0.8, built from normally distributed innovations:</p>
<pre><code>X = tseries(0:20,0);
E = tseries(1:20,@randn);
X = arma(X,E,[1,-0.8],[ ],1:20);
plot(X);</code></pre>

</body>
<div class="copyright">IRIS Toolbox. Copyright &copy; 2007-2015 IRIS Solutions Team.</div>
</html>
